package hsm.interfacetest;

import java.io.FileInputStream;
import java.util.Properties;

/**
 * 加载系统配置文件
 * 
 * @author LLH
 * @version 1.0.0 2013-3-25 上午9:23:40
 */
public class SystemConfigInit {

	public static Properties initConfig() throws Exception {
		FileInputStream fis = null;
		Properties prop = new Properties();
		try {
			String fileSep = System.getProperty("file.separator");
			String fileName = "config" + fileSep + "config.properties";
			try {
				fis = new FileInputStream(".." + fileSep + fileName);
			} catch (Exception e) {
				fis = new FileInputStream(fileName);
			}
			prop.load(fis);

		} finally {
			if (fis != null)
				fis.close();
		}
		return prop;
	}
}
